﻿using System;
using System.Management.Automation.Host;
using System.Threading;

namespace PSSymbolStore.Manager
{
    public class TransactionManagerHost : PSHost
    {
        private readonly Guid _instanceId = Guid.NewGuid();
        private readonly TransactionManagerHostUserInterface _ui;

        public TransactionManagerHost(TransactionManagerHostUserInterface userInterface)
        {
            _ui = userInterface;
        }

        public override System.Globalization.CultureInfo CurrentCulture
        {
            get { return Thread.CurrentThread.CurrentCulture; }
        }

        public override System.Globalization.CultureInfo CurrentUICulture
        {
            get { return Thread.CurrentThread.CurrentUICulture; }
        }

        public override PSHostUserInterface UI
        {
            get { return _ui; }
        }

        public override Version Version
        {
            get { return new Version(0, 1, 0, 0); }
        }

        public override string Name
        {
            get { return "Symbol Store Transaction Manager Host"; }
        }

        public override Guid InstanceId
        {
            get { return _instanceId; }
        }

        public override void SetShouldExit(int exitCode)
        {
            // Tell the hosting application to shut down
            //System.Windows.Forms.Application.Exit();
        }

        public override void EnterNestedPrompt()
        {
            throw new NotImplementedException();
        }

        public override void ExitNestedPrompt()
        {
            throw new NotImplementedException();
        }

        public override void NotifyBeginApplication()
        {
            throw new NotImplementedException();
        }

        public override void NotifyEndApplication()
        {
            throw new NotImplementedException();
        }
    }
}
